#ifndef Pipeline_h
#define Pipeline_h

#include "stdafx.h"
#include <opencv\cv.h>
#include <opencv\highgui.h>
#include "Frame.h"
#include <string>
#include "CourtModel.h"
#include "Intersection.h"

class Pipeline
{
	Frame _currFrame;
	Frame _prevFrame;
	cv::Mat _prevFrameMat;
	CourtModel _courtModel;
	std::string _vidPath;
	std::string _outPath;
	bool _trackPlayer;
	cv::VideoCapture _vidStream;
	cv::Mat homography;
	std::vector<std::vector<cv::Point2f>> windowFeatures;
	std::vector<int> _changes;
	double oldScore;


	public:
		Pipeline(void);
		Pipeline(std::string, std::string, CourtModel, bool);
		Pipeline(std::string, std::string, CourtModel);
		~Pipeline(void);

		bool incrementFrame();
		Frame getFrame();
		
		void loadCourtModel(std::string);
		
		bool changedViewPoint(Frame, Frame);
		bool changedViewPoint(cv::Mat, cv::Mat);

		void preProcess();
		void process();
};

#endif